import 'package:wanandroid_flutter/px_model.dart';

pxModelFromJson(PxModel data, Map<String, dynamic> json) {
	if (json['userPictureShareedCount'] != null) {
		data.userPictureShareedCount = json['userPictureShareedCount']?.toInt();
	}
	if (json['doTsa'] != null) {
		data.doTsa = json['doTsa'];
	}
	if (json['isSignRecommend'] != null) {
		data.isSignRecommend = json['isSignRecommend'];
	}
	if (json['rating'] != null) {
		data.rating = json['rating']?.toDouble();
	}
	if (json['riseUpDate'] != null) {
		data.riseUpDate = json['riseUpDate']?.toInt();
	}
	if (json['uploadedDate'] != null) {
		data.uploadedDate = json['uploadedDate']?.toInt();
	}
	if (json['pictureStrategyCount'] != null) {
		data.pictureStrategyCount = json['pictureStrategyCount']?.toInt();
	}
	if (json['ratingMax'] != null) {
		data.ratingMax = json['ratingMax']?.toDouble();
	}
	if (json['hotUpDate'] != null) {
		data.hotUpDate = json['hotUpDate']?.toInt();
	}
	if (json['userPictureContentState'] != null) {
		data.userPictureContentState = json['userPictureContentState'];
	}
	if (json['userPictureCreativityState'] != null) {
		data.userPictureCreativityState = json['userPictureCreativityState'];
	}
	if (json['licenceId'] != null) {
		data.licenceId = json['licenceId']?.toString();
	}
	if (json['userPictureTechnicalState'] != null) {
		data.userPictureTechnicalState = json['userPictureTechnicalState'];
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toInt();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toString();
	}
	if (json['state'] != null) {
		data.state = json['state']?.toInt();
	}
	if (json['height'] != null) {
		data.height = json['height']?.toInt();
	}
	if (json['longitude'] != null) {
		data.longitude = json['longitude']?.toInt();
	}
	if (json['uploaderId'] != null) {
		data.uploaderId = json['uploaderId']?.toString();
	}
	if (json['sort'] != null) {
		data.sort = json['sort']?.toInt();
	}
	if (json['tags'] != null) {
		data.tags = json['tags']?.toString();
	}
	if (json['commentCount'] != null) {
		data.commentCount = json['commentCount']?.toInt();
	}
	if (json['pictureLikeedCount'] != null) {
		data.pictureLikeedCount = json['pictureLikeedCount']?.toInt();
	}
	if (json['extendedField'] != null) {
		data.extendedField = new PxExtendedField().fromJson(json['extendedField']);
	}
	if (json['ratingMaxDate'] != null) {
		data.ratingMaxDate = json['ratingMaxDate']?.toInt();
	}
	if (json['exif'] != null) {
		data.exif = new PxExif().fromJson(json['exif']);
	}
	if (json['latitude'] != null) {
		data.latitude = json['latitude']?.toInt();
	}
	if (json['origin'] != null) {
		data.origin = json['origin']?.toString();
	}
	if (json['description'] != null) {
		data.description = json['description']?.toString();
	}
	if (json['privacy'] != null) {
		data.privacy = json['privacy']?.toInt();
	}
	if (json['pictureLightedCount'] != null) {
		data.pictureLightedCount = json['pictureLightedCount']?.toInt();
	}
	if (json['title'] != null) {
		data.title = json['title']?.toString();
	}
	if (json['userPictureCreativityedCount'] != null) {
		data.userPictureCreativityedCount = json['userPictureCreativityedCount']?.toInt();
	}
	if (json['photoCount'] != null) {
		data.photoCount = json['photoCount']?.toInt();
	}
	if (json['originId'] != null) {
		data.originId = json['originId']?.toInt();
	}
	if (json['uploaderInfo'] != null) {
		data.uploaderInfo = new PxUploaderInfo().fromJson(json['uploaderInfo']);
	}
	if (json['userPictureTechnicaledCount'] != null) {
		data.userPictureTechnicaledCount = json['userPictureTechnicaledCount']?.toInt();
	}
	if (json['userPictureShareState'] != null) {
		data.userPictureShareState = json['userPictureShareState'];
	}
	if (json['profileSortTime'] != null) {
		data.profileSortTime = json['profileSortTime']?.toInt();
	}
	if (json['timestamp'] != null) {
		data.timestamp = json['timestamp'];
	}
	if (json['hasCover'] != null) {
		data.hasCover = json['hasCover']?.toInt();
	}
	if (json['openState'] != null) {
		data.openState = json['openState']?.toString();
	}
	if (json['userPicturePutupedCount'] != null) {
		data.userPicturePutupedCount = json['userPicturePutupedCount']?.toInt();
	}
	if (json['userPictureCompositionState'] != null) {
		data.userPictureCompositionState = json['userPictureCompositionState'];
	}
	if (json['picturePvCount'] != null) {
		data.picturePvCount = json['picturePvCount']?.toInt();
	}
	if (json['userPictureCompositionedCount'] != null) {
		data.userPictureCompositionedCount = json['userPictureCompositionedCount']?.toInt();
	}
	if (json['url'] != null) {
		data.url = new PxUrl().fromJson(json['url']);
	}
	if (json['exifInfo'] != null) {
		data.exifInfo = new PxExifInfo().fromJson(json['exifInfo']);
	}
	if (json['createdDate'] != null) {
		data.createdDate = json['createdDate']?.toInt();
	}
	if (json['uploaderName'] != null) {
		data.uploaderName = json['uploaderName']?.toString();
	}
	if (json['refer'] != null) {
		data.refer = json['refer']?.toString();
	}
	if (json['width'] != null) {
		data.width = json['width']?.toInt();
	}
	if (json['userPictureContentedCount'] != null) {
		data.userPictureContentedCount = json['userPictureContentedCount']?.toInt();
	}
	if (json['category'] != null) {
		data.category = new PxCategory().fromJson(json['category']);
	}
	if (json['userPicturePutupState'] != null) {
		data.userPicturePutupState = json['userPicturePutupState'];
	}
	if (json['categoryId'] != null) {
		data.categoryId = json['categoryId']?.toString();
	}
	if (json['resourceType'] != null) {
		data.resourceType = json['resourceType']?.toInt();
	}
	return data;
}

Map<String, dynamic> pxModelToJson(PxModel entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['userPictureShareedCount'] = entity.userPictureShareedCount;
	data['doTsa'] = entity.doTsa;
	data['isSignRecommend'] = entity.isSignRecommend;
	data['rating'] = entity.rating;
	data['riseUpDate'] = entity.riseUpDate;
	data['uploadedDate'] = entity.uploadedDate;
	data['pictureStrategyCount'] = entity.pictureStrategyCount;
	data['ratingMax'] = entity.ratingMax;
	data['hotUpDate'] = entity.hotUpDate;
	data['userPictureContentState'] = entity.userPictureContentState;
	data['userPictureCreativityState'] = entity.userPictureCreativityState;
	data['licenceId'] = entity.licenceId;
	data['userPictureTechnicalState'] = entity.userPictureTechnicalState;
	data['createdTime'] = entity.createdTime;
	data['id'] = entity.id;
	data['state'] = entity.state;
	data['height'] = entity.height;
	data['longitude'] = entity.longitude;
	data['uploaderId'] = entity.uploaderId;
	data['sort'] = entity.sort;
	data['tags'] = entity.tags;
	data['commentCount'] = entity.commentCount;
	data['pictureLikeedCount'] = entity.pictureLikeedCount;
	if (entity.extendedField != null) {
		data['extendedField'] = entity.extendedField.toJson();
	}
	data['ratingMaxDate'] = entity.ratingMaxDate;
	if (entity.exif != null) {
		data['exif'] = entity.exif.toJson();
	}
	data['latitude'] = entity.latitude;
	data['origin'] = entity.origin;
	data['description'] = entity.description;
	data['privacy'] = entity.privacy;
	data['pictureLightedCount'] = entity.pictureLightedCount;
	data['title'] = entity.title;
	data['userPictureCreativityedCount'] = entity.userPictureCreativityedCount;
	data['photoCount'] = entity.photoCount;
	data['originId'] = entity.originId;
	if (entity.uploaderInfo != null) {
		data['uploaderInfo'] = entity.uploaderInfo.toJson();
	}
	data['userPictureTechnicaledCount'] = entity.userPictureTechnicaledCount;
	data['userPictureShareState'] = entity.userPictureShareState;
	data['profileSortTime'] = entity.profileSortTime;
	data['timestamp'] = entity.timestamp;
	data['hasCover'] = entity.hasCover;
	data['openState'] = entity.openState;
	data['userPicturePutupedCount'] = entity.userPicturePutupedCount;
	data['userPictureCompositionState'] = entity.userPictureCompositionState;
	data['picturePvCount'] = entity.picturePvCount;
	data['userPictureCompositionedCount'] = entity.userPictureCompositionedCount;
	if (entity.url != null) {
		data['url'] = entity.url.toJson();
	}
	if (entity.exifInfo != null) {
		data['exifInfo'] = entity.exifInfo.toJson();
	}
	data['createdDate'] = entity.createdDate;
	data['uploaderName'] = entity.uploaderName;
	data['refer'] = entity.refer;
	data['width'] = entity.width;
	data['userPictureContentedCount'] = entity.userPictureContentedCount;
	if (entity.category != null) {
		data['category'] = entity.category.toJson();
	}
	data['userPicturePutupState'] = entity.userPicturePutupState;
	data['categoryId'] = entity.categoryId;
	data['resourceType'] = entity.resourceType;
	return data;
}

pxExtendedFieldFromJson(PxExtendedField data, Map<String, dynamic> json) {
	if (json['riseUpDate'] != null) {
		data.riseUpDate = json['riseUpDate']?.toInt();
	}
	if (json['hotUpDate'] != null) {
		data.hotUpDate = json['hotUpDate']?.toInt();
	}
	return data;
}

Map<String, dynamic> pxExtendedFieldToJson(PxExtendedField entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['riseUpDate'] = entity.riseUpDate;
	data['hotUpDate'] = entity.hotUpDate;
	return data;
}

pxExifFromJson(PxExif data, Map<String, dynamic> json) {
	return data;
}

Map<String, dynamic> pxExifToJson(PxExif entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	return data;
}

pxUploaderInfoFromJson(PxUploaderInfo data, Map<String, dynamic> json) {
	if (json['coverUrl'] != null) {
		data.coverUrl = new PxUploaderInfoCoverUrl().fromJson(json['coverUrl']);
	}
	if (json['userFollowedCount'] != null) {
		data.userFollowedCount = json['userFollowedCount']?.toInt();
	}
	if (json['userRoleIds'] != null) {
		data.userRoleIds = new PxUploaderInfoUserRoleIds().fromJson(json['userRoleIds']);
	}
	if (json['nickName'] != null) {
		data.nickName = json['nickName']?.toString();
	}
	if (json['avatar'] != null) {
		data.avatar = new PxUploaderInfoAvatar().fromJson(json['avatar']);
	}
	if (json['id'] != null) {
		data.id = json['id']?.toString();
	}
	if (json['state'] != null) {
		data.state = json['state']?.toInt();
	}
	if (json['userType'] != null) {
		data.userType = json['userType']?.toInt();
	}
	if (json['userName'] != null) {
		data.userName = json['userName']?.toString();
	}
	return data;
}

Map<String, dynamic> pxUploaderInfoToJson(PxUploaderInfo entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	if (entity.coverUrl != null) {
		data['coverUrl'] = entity.coverUrl.toJson();
	}
	data['userFollowedCount'] = entity.userFollowedCount;
	if (entity.userRoleIds != null) {
		data['userRoleIds'] = entity.userRoleIds.toJson();
	}
	data['nickName'] = entity.nickName;
	if (entity.avatar != null) {
		data['avatar'] = entity.avatar.toJson();
	}
	data['id'] = entity.id;
	data['state'] = entity.state;
	data['userType'] = entity.userType;
	data['userName'] = entity.userName;
	return data;
}

pxUploaderInfoCoverUrlFromJson(PxUploaderInfoCoverUrl data, Map<String, dynamic> json) {
	if (json['baseUrl'] != null) {
		data.baseUrl = json['baseUrl']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toString();
	}
	return data;
}

Map<String, dynamic> pxUploaderInfoCoverUrlToJson(PxUploaderInfoCoverUrl entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['baseUrl'] = entity.baseUrl;
	data['id'] = entity.id;
	return data;
}

pxUploaderInfoUserRoleIdsFromJson(PxUploaderInfoUserRoleIds data, Map<String, dynamic> json) {
	return data;
}

Map<String, dynamic> pxUploaderInfoUserRoleIdsToJson(PxUploaderInfoUserRoleIds entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	return data;
}

pxUploaderInfoAvatarFromJson(PxUploaderInfoAvatar data, Map<String, dynamic> json) {
	if (json['a1'] != null) {
		data.a1 = json['a1']?.toString();
	}
	if (json['a2'] != null) {
		data.a2 = json['a2']?.toString();
	}
	if (json['a3'] != null) {
		data.a3 = json['a3']?.toString();
	}
	if (json['baseUrl'] != null) {
		data.baseUrl = json['baseUrl']?.toString();
	}
	if (json['a4'] != null) {
		data.a4 = json['a4']?.toString();
	}
	return data;
}

Map<String, dynamic> pxUploaderInfoAvatarToJson(PxUploaderInfoAvatar entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['a1'] = entity.a1;
	data['a2'] = entity.a2;
	data['a3'] = entity.a3;
	data['baseUrl'] = entity.baseUrl;
	data['a4'] = entity.a4;
	return data;
}

pxUrlFromJson(PxUrl data, Map<String, dynamic> json) {
	if (json['p1'] != null) {
		data.p1 = json['p1']?.toString();
	}
	if (json['p2'] != null) {
		data.p2 = json['p2']?.toString();
	}
	if (json['p3'] != null) {
		data.p3 = json['p3']?.toString();
	}
	if (json['p4'] != null) {
		data.p4 = json['p4']?.toString();
	}
	if (json['baseUrl'] != null) {
		data.baseUrl = json['baseUrl']?.toString();
	}
	if (json['p5'] != null) {
		data.p5 = json['p5']?.toString();
	}
	if (json['p6'] != null) {
		data.p6 = json['p6']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toString();
	}
	return data;
}

Map<String, dynamic> pxUrlToJson(PxUrl entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['p1'] = entity.p1;
	data['p2'] = entity.p2;
	data['p3'] = entity.p3;
	data['p4'] = entity.p4;
	data['baseUrl'] = entity.baseUrl;
	data['p5'] = entity.p5;
	data['p6'] = entity.p6;
	data['id'] = entity.id;
	return data;
}

pxExifInfoFromJson(PxExifInfo data, Map<String, dynamic> json) {
	if (json['dateTime'] != null) {
		data.dateTime = json['dateTime']?.toInt();
	}
	if (json['resourceId'] != null) {
		data.resourceId = json['resourceId']?.toString();
	}
	if (json['gpsLongitude'] != null) {
		data.gpsLongitude = json['gpsLongitude']?.toString();
	}
	if (json['exposureTime'] != null) {
		data.exposureTime = json['exposureTime']?.toString();
	}
	if (json['iso'] != null) {
		data.iso = json['iso']?.toString();
	}
	if (json['gcj02Lng'] != null) {
		data.gcj02Lng = json['gcj02Lng']?.toDouble();
	}
	if (json['type'] != null) {
		data.type = json['type']?.toString();
	}
	if (json['dateTimeDigitized'] != null) {
		data.dateTimeDigitized = json['dateTimeDigitized']?.toInt();
	}
	if (json['gpsLongitudeGcj02'] != null) {
		data.gpsLongitudeGcj02 = json['gpsLongitudeGcj02']?.toDouble();
	}
	if (json['gcj02Lat'] != null) {
		data.gcj02Lat = json['gcj02Lat']?.toDouble();
	}
	if (json['bd09Lat'] != null) {
		data.bd09Lat = json['bd09Lat']?.toDouble();
	}
	if (json['model'] != null) {
		data.model = json['model']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toString();
	}
	if (json['bd09Lng'] != null) {
		data.bd09Lng = json['bd09Lng']?.toDouble();
	}
	if (json['make'] != null) {
		data.make = json['make']?.toString();
	}
	if (json['gpsLatitude'] != null) {
		data.gpsLatitude = json['gpsLatitude']?.toString();
	}
	if (json['exposureTimeVcg'] != null) {
		data.exposureTimeVcg = json['exposureTimeVcg']?.toString();
	}
	if (json['modelVcg'] != null) {
		data.modelVcg = json['modelVcg']?.toString();
	}
	if (json['gpsLatitudeGcj02'] != null) {
		data.gpsLatitudeGcj02 = json['gpsLatitudeGcj02']?.toDouble();
	}
	if (json['uploadTime'] != null) {
		data.uploadTime = json['uploadTime']?.toInt();
	}
	if (json['aperture'] != null) {
		data.aperture = json['aperture']?.toString();
	}
	if (json['dateTimeOriginal'] != null) {
		data.dateTimeOriginal = json['dateTimeOriginal']?.toInt();
	}
	if (json['wgs84Lat'] != null) {
		data.wgs84Lat = json['wgs84Lat']?.toDouble();
	}
	if (json['wgs84Lng'] != null) {
		data.wgs84Lng = json['wgs84Lng']?.toDouble();
	}
	if (json['focalLength'] != null) {
		data.focalLength = json['focalLength']?.toString();
	}
	return data;
}

Map<String, dynamic> pxExifInfoToJson(PxExifInfo entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['dateTime'] = entity.dateTime;
	data['resourceId'] = entity.resourceId;
	data['gpsLongitude'] = entity.gpsLongitude;
	data['exposureTime'] = entity.exposureTime;
	data['iso'] = entity.iso;
	data['gcj02Lng'] = entity.gcj02Lng;
	data['type'] = entity.type;
	data['dateTimeDigitized'] = entity.dateTimeDigitized;
	data['gpsLongitudeGcj02'] = entity.gpsLongitudeGcj02;
	data['gcj02Lat'] = entity.gcj02Lat;
	data['bd09Lat'] = entity.bd09Lat;
	data['model'] = entity.model;
	data['id'] = entity.id;
	data['bd09Lng'] = entity.bd09Lng;
	data['make'] = entity.make;
	data['gpsLatitude'] = entity.gpsLatitude;
	data['exposureTimeVcg'] = entity.exposureTimeVcg;
	data['modelVcg'] = entity.modelVcg;
	data['gpsLatitudeGcj02'] = entity.gpsLatitudeGcj02;
	data['uploadTime'] = entity.uploadTime;
	data['aperture'] = entity.aperture;
	data['dateTimeOriginal'] = entity.dateTimeOriginal;
	data['wgs84Lat'] = entity.wgs84Lat;
	data['wgs84Lng'] = entity.wgs84Lng;
	data['focalLength'] = entity.focalLength;
	return data;
}

pxCategoryFromJson(PxCategory data, Map<String, dynamic> json) {
	if (json['fivepxId'] != null) {
		data.fivepxId = json['fivepxId']?.toString();
	}
	if (json['newId'] != null) {
		data.newId = json['newId']?.toString();
	}
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['createdTime'] != null) {
		data.createdTime = json['createdTime']?.toInt();
	}
	if (json['description'] != null) {
		data.description = json['description']?.toString();
	}
	if (json['id'] != null) {
		data.id = json['id']?.toString();
	}
	return data;
}

Map<String, dynamic> pxCategoryToJson(PxCategory entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['fivepxId'] = entity.fivepxId;
	data['newId'] = entity.newId;
	data['name'] = entity.name;
	data['createdTime'] = entity.createdTime;
	data['description'] = entity.description;
	data['id'] = entity.id;
	return data;
}